import {observable} from 'mobx'

const userInfoStore = observable({
  userInfo: {},
  set(key: string, value: any) {
    this.userInfo[key] = value
  },
  get(key: string) {
    return this.userInfo[key]
  },
  remove(key: string) {
    delete this.userInfo[key]
  },
  clear() {
    this.userInfo = {};
  },
})
export default userInfoStore
